﻿using System.Collections.Generic;

namespace DataManage
{
    /// <summary>
    /// MBMU对SBMU协议（一级主控）
    /// </summary>
    public class PrimaryControlSBMUInfo
    {
        /// <summary>
        /// SBMU板号
        /// </summary>
        public int SBMUNo {  get; set; }
        /// <summary>
        /// MBMU编号
        /// </summary>
        public int MBMUNo {  get; set; }
        /// <summary>
        /// 集装箱编号
        /// </summary>
        public int ContainerNo {  get; set; }
        /// <summary>
        /// VCMU个数
        /// </summary>
        public int VCMUNum {  get; set; }
        /// <summary>
        /// TCMU个数
        /// </summary>
        public int TCMUNum { get; set; }
        private double voltage;
        /// <summary>
        /// SBMU总电压
        /// </summary>
        public double Voltage { get => voltage; set => voltage = value; }
        private double current;
        /// <summary>
        /// 总电流
        /// </summary>
        public double Current { get => current; set => current = value; }
        private double power;
        /// <summary>
        /// 总功率
        /// </summary>
        public double Power { get => power; set => power = value; }
        private double chgDchEfficiency;
        /// <summary>
        /// 充放电效率
        /// </summary>
        public double ChgDchEfficiency { get => chgDchEfficiency; set => chgDchEfficiency = value; }
        private SystemRunState systemRunStatus;
        public SystemRunState SystemRunStatus { get => systemRunStatus; set => systemRunStatus = value; }
        private ChgDchState chgDchState;
        public ChgDchState ChgDchState { get => chgDchState; set { chgDchState = value; } }

        private SystemFaultState systemFaultState;
        public SystemFaultState SystemFaultState { get => systemFaultState; set { systemFaultState = value; } }

        #region 单体电压极值
        private double cellVoltageMax;
        /// <summary>
        /// 单体最大电压
        /// </summary>
        public double CellVoltageMax { get => cellVoltageMax; set => cellVoltageMax = value; }
        private int maxCellVolClusterNo;
        /// <summary>
        /// 最高单体电压簇内编号
        /// </summary>
        public int MaxCellVolClusterNo { get => maxCellVolClusterNo; set => maxCellVolClusterNo = value; }
        private int maxCellVolVPackNo;
        /// <summary>
        /// 最高单体电压对应箱号（VCMU）
        /// </summary>
        public int MaxCellVolVPackNo { get => maxCellVolVPackNo; set => maxCellVolVPackNo = value; }
        private int maxCellVolNoInPack;
        /// <summary>
        /// 最高单体电压对应箱内编号
        /// </summary>
        public int MaxCellVolNoInPack { get => maxCellVolNoInPack; set => maxCellVolNoInPack = value; }
        private double cellVoltageMin;
        /// <summary>
        /// 单体最小电压
        /// </summary>
        public double CellVoltageMin { get => cellVoltageMin; set => cellVoltageMin = value; }
        private int minCellVolClusterNo;
        /// <summary>
        /// 最小单体电压簇内编号
        /// </summary>
        public int MinCellVolClusterNo { get => minCellVolClusterNo; set => minCellVolClusterNo = value; }
        private int minCellVolVPackNo;
        /// <summary>
        /// 最小单体电压对应箱号（VCMU）
        /// </summary>
        public int MinCellVolVPackNo { get => minCellVolVPackNo; set => minCellVolVPackNo = value; }
        private int minCellVolNoInPack;
        /// <summary>
        /// 最小单体电压对应箱内编号
        /// </summary>
        public int MinCellVolNoInPack { get => minCellVolNoInPack; set => minCellVolNoInPack = value; }

        private double cellAvgVoltage;
        /// <summary>
        /// 平均电压
        /// </summary>
        public double CellAvgVoltage { get => cellAvgVoltage; set => cellAvgVoltage = value; }
        private double cellDetVoltage;
        /// <summary>
        /// 压差
        /// </summary>
        public double CellDetVoltage { get => cellDetVoltage; set => cellDetVoltage = value; }
        #endregion

        #region 单体温度极值
        private double cellTempMax;
        /// <summary>
        /// 单体最大温度
        /// </summary>
        public double CellTempMax { get => cellTempMax; set => cellTempMax = value; }
        private int maxCellTempClusterNo;
        /// <summary>
        /// 最高单体温度簇内编号
        /// </summary>
        public int MaxCellTempClusterNo { get => maxCellTempClusterNo; set => maxCellTempClusterNo = value; }
        private int maxCellTempVPackNo;
        /// <summary>
        /// 最高单体温度对应箱号（VCMU）
        /// </summary>
        public int MaxCellTempVPackNo { get => maxCellTempVPackNo; set => maxCellTempVPackNo = value; }
        private int maxCellTempNoInPack;
        /// <summary>
        /// 最高单体温度对应箱内编号
        /// </summary>
        public int MaxCellTempNoInPack { get => maxCellTempNoInPack; set => maxCellTempNoInPack = value; }
        private double cellTempMin;
        /// <summary>
        /// 单体最小温度
        /// </summary>
        public double CellTempMin { get => cellTempMin; set => cellTempMin = value; }
        private int minCellTempClusterNo;
        /// <summary>
        /// 最小单体温度簇内编号
        /// </summary>
        public int MinCellTempClusterNo { get => minCellTempClusterNo; set => minCellTempClusterNo = value; }
        private int minCellTempVPackNo;
        /// <summary>
        /// 最小单体温度对应箱号（VCMU）
        /// </summary>
        public int MinCellTempVPackNo { get => minCellTempVPackNo; set => minCellTempVPackNo = value; }
        private int minCellTempNoInPack;
        /// <summary>
        /// 最小单体温度对应箱内编号
        /// </summary>
        public int MinCellTempNoInPack { get => minCellTempNoInPack; set => minCellTempNoInPack = value; }

        private double cellAvgTemp;
        /// <summary>
        /// 平均温度
        /// </summary>
        public double CellAvgTemp { get => cellAvgTemp; set => cellAvgTemp = value; }
        private double cellDetTemp;
        /// <summary>
        /// 温差
        /// </summary>
        public double CellDetTemp { get => cellDetTemp; set => cellDetTemp = value; }
        #endregion

        private double showSOC;
        /// <summary>
        /// 显示SOC
        /// </summary>
        public double ShowSOC { get => showSOC; set => showSOC = value; }
        private double soh;
        public double SOH { get => soh; set => soh = value; }

        private Dictionary<string, double> otherInfo;
        /// <summary>
        /// 其他信息
        /// <para>SOE</para>
        /// <para>SOR</para>
        /// <para>可用SOC</para>
        /// <para>当前可充容量（Ah）</para>
        /// <para>当前可充电量（kWh）</para>
        /// <para>当前可放容量（Ah）</para>
        /// <para>当前可放电量（kWh）</para>
        /// <para>累积充电容量（Ah）</para>
        /// <para>累积放电容量（Ah）</para>
        /// <para>累积充电电量（kWh）</para>
        /// <para>累积放电电量（kWh）</para>
        /// <para>单次充电容量（Ah）</para>
        /// <para>单次放电容量（Ah）</para>
        /// <para>单次充电电量（kWh）</para>
        /// <para>单次放电电量（kWh）</para>
        /// <para>最大允许充电电流（A）</para>
        /// <para>最大允许放电电流（A）</para>
        /// <para>最大允许充电功率（kW）</para>
        /// <para>最大允许放电功率（kW）</para>
        /// <para>正端绝缘电阻</para>
        /// <para>负端绝缘电阻</para>
        /// <para>充电插座1CC2阻值</para>
        /// <para>充电插座2CC2阻值</para>
        /// <para>快充口01插座正极温度</para>
        /// <para>快充口01插座负极温度</para>
        /// <para>快充口02插座正极温度</para>
        /// <para>快充口02插座负极温度</para>
        /// <para>环境温度1</para>
        /// <para>环境温度2</para>
        /// <para>DI状态</para>
        /// <para>簇1#、簇2#、簇3# 电流</para>
        /// </summary>
        public Dictionary<string, double> OtherInfo { get => otherInfo; set => otherInfo = value; }
        private Dictionary<string, RelayStatus> relayInfo;
        /// <summary>
        /// 继电器信息集合、干接点状态
        /// </summary>
        public Dictionary<string, RelayStatus> RelayInfo { get => relayInfo; set  => relayInfo = value;  }
        private Dictionary<int, double> cellVolInfo;
        /// <summary>
        /// 单体电压信息
        /// <para>Key：均衡标志</para>
        /// <para>Value：数值</para>
        /// </summary>
        public Dictionary<int, double> CellVolInfo { get => cellVolInfo; set => cellVolInfo = value; }
        private List<double> cellTempInfo;
        /// <summary>
        /// 单体温度信息
        /// </summary>
        public List<double> CellTempInfo { get => cellTempInfo; set => cellTempInfo = value; }
        private string softwareVersion;
        /// <summary>
        /// 软件版本
        /// </summary>
        public string SoftwareVersion { get => softwareVersion; set => softwareVersion = value; }
        private string hardwareVersion;
        /// <summary>
        /// 硬件版本
        /// </summary>
        public string HardwareVersion { get => hardwareVersion; set => hardwareVersion = value; }



    }
}
